;
layui.define([ "table", "form" ], function(exports) {
	tab = layui.table, form = layui.form;
	tab.render({
		elem : "#LAY-web-list",
		url : layui.setter.base + "admin/clearing/monitor/listJson",
		cols : [ [ {
			field : "settleDate",
			width : 160,
			title : "日切日期",
			sort : !0
		}, {
			field : "channelCode",
			title : "渠道编号"
		}, {
			field : "dataCount",
			title : "总数量"
		}, {
			field : "sumAmountShow",
			title : "总金额"
		}, {
			title : "操作",
			width : 150,
			align : "center",
			fixed : "right",
			toolbar : "#table-content-list"
		} ] ],
		page : !0,
		limit : 10,
		limits : [ 10, 15, 20, 25, 30 ],
		text: {none: '暂无相关数据'}
	}), tab.on("tool(LAY-web-list)", function(row) {
		if ("getdata" === row.event) {
			layer.confirm("确定取数吗？", function(e) {
				console.log(row.data);
				// 请求删除接口
				layui.admin.req({
					url : layui.setter.base + "admin/clearing/monitor/getData?id="
							+ row.data.id + "&r=" + Math.random(),
					data : null,
					done : function(res) {
						if (res.code !== 0) {
							layer.msg(res.msg, {
								icon : 2
							});
						} else {
							layer.msg(res.msg, {
								icon : 1
							});
							layui.table.reload('LAY-web-list'); // 重载表格
							layer.close(e); // 再执行关闭
						}
					}
				});
			});
			return;
		}
	}), exports("clearingMonitor", {})
});